package com.erp.pojo.purchase;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 采购订单表
 * @TableName purchase_orders
 */
@TableName(value ="purchase_orders")
@Data
public class PurchaseOrders implements Serializable {
    /**
     * id
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 采购订单的编号
     */
    @TableField(value = "name")
    private String name;

    /**
     * 供货商id
     */
    @TableField(value = "provide_user_id")
    private Long provide_user_id;

    /**
     * 采购计划id
     */
    @TableField(value = "purchase_plan_id")
    private Long purchase_plan_id;

    /**
     * 订单总金额
     */
    @TableField(value = "money")
    private Integer money;

    /**
     * 订单总数量
     */
    @TableField(value = "mun")
    private Integer mun;

    /**
     * 状态 1等待审核 2执行中 3完成 4未通过 5已通过
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date create_time;

    /**
     * 合同照片
     */
    @TableField(value = "contract_picture")
    private String contract_picture;

    /**
     * 开始时间
     */
    @TableField(value = "start_time")
    private Date start_time;

    /**
     * 结束时间
     */
    @TableField(value = "end_time")
    private Date end_time;

    /**
     * 支付方式
     */
    @TableField(value = "pay_method")
    private String pay_method;

    /**
     * 支付照片
     */
    @TableField(value = "pay_img")
    private String pay_img;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PurchaseOrders other = (PurchaseOrders) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getProvide_user_id() == null ? other.getProvide_user_id() == null : this.getProvide_user_id().equals(other.getProvide_user_id()))
            && (this.getPurchase_plan_id() == null ? other.getPurchase_plan_id() == null : this.getPurchase_plan_id().equals(other.getPurchase_plan_id()))
            && (this.getMoney() == null ? other.getMoney() == null : this.getMoney().equals(other.getMoney()))
            && (this.getMun() == null ? other.getMun() == null : this.getMun().equals(other.getMun()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreate_time() == null ? other.getCreate_time() == null : this.getCreate_time().equals(other.getCreate_time()))
            && (this.getContract_picture() == null ? other.getContract_picture() == null : this.getContract_picture().equals(other.getContract_picture()))
            && (this.getStart_time() == null ? other.getStart_time() == null : this.getStart_time().equals(other.getStart_time()))
            && (this.getEnd_time() == null ? other.getEnd_time() == null : this.getEnd_time().equals(other.getEnd_time()))
            && (this.getPay_method() == null ? other.getPay_method() == null : this.getPay_method().equals(other.getPay_method()))
            && (this.getPay_img() == null ? other.getPay_img() == null : this.getPay_img().equals(other.getPay_img()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getProvide_user_id() == null) ? 0 : getProvide_user_id().hashCode());
        result = prime * result + ((getPurchase_plan_id() == null) ? 0 : getPurchase_plan_id().hashCode());
        result = prime * result + ((getMoney() == null) ? 0 : getMoney().hashCode());
        result = prime * result + ((getMun() == null) ? 0 : getMun().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreate_time() == null) ? 0 : getCreate_time().hashCode());
        result = prime * result + ((getContract_picture() == null) ? 0 : getContract_picture().hashCode());
        result = prime * result + ((getStart_time() == null) ? 0 : getStart_time().hashCode());
        result = prime * result + ((getEnd_time() == null) ? 0 : getEnd_time().hashCode());
        result = prime * result + ((getPay_method() == null) ? 0 : getPay_method().hashCode());
        result = prime * result + ((getPay_img() == null) ? 0 : getPay_img().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", provide_user_id=").append(provide_user_id);
        sb.append(", purchase_plan_id=").append(purchase_plan_id);
        sb.append(", money=").append(money);
        sb.append(", mun=").append(mun);
        sb.append(", status=").append(status);
        sb.append(", create_time=").append(create_time);
        sb.append(", contract_picture=").append(contract_picture);
        sb.append(", start_time=").append(start_time);
        sb.append(", end_time=").append(end_time);
        sb.append(", pay_method=").append(pay_method);
        sb.append(", pay_img=").append(pay_img);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}